﻿@using FTBS.Models.Entities;
@model List<FTBS.Models.Entities.Theater>
@{ 
    if(Model.Count()>0){
    ViewBag.Title = "Cụm rạp "+Model[0].User.UserName; }
    else{
        ViewBag.Title = "Cụm rạp ";
    }
    Layout = "~/Views/Shared/_Layout.cshtml";
   var listSchedules = (List<Schedule>)ViewBag.ListSchedule;
}
<style>
    .filmkind {
        padding: 5px;
        font-size: 27px;
        background-color: rgb(83, 141, 160);
        color: white;
    }
</style>
@if (Model.Count() > 0)
{
    <div class="panel" style="background-color: white; margin-top: 20px; margin-left: 15px; width: 97.5%; height: 100%; min-height: 485px">
        <div class="filmkind">Cụm rạp @Model[0].User.UserName</div>
        <div>
            <div style="display: inline-block; margin: 0 auto">
                @foreach (var item in Model)
                {
                    <div style="float: left; width: 310px; height: 340px; margin-left: 10px; padding-top: 10px;">
                        <div style="margin-left: 8px; border: solid; border-width: 1px">
                            <a href="/Schedule/ScheduleTheater">
                                <img src="~/Image/Theater/@item.ImageURL"  style="height: 200px; width: 300px;"/>
                            </a>
                        </div>
                        <div style="font-weight: bold; font-size: 18px; color: darkorange;margin-left: 8px; ">@item.TheaterName</div>
                        <div style="width: 300px; height: 45px; font-weight: bold;margin-left: 8px; ">
                            Địa chỉ: @item.Address . Số điện thoại: @item.PhoneNumber
                        </div>
                        <span>
                            <button class="warning" onclick="ChangeView()" style="margin-top:1em;margin-left: 8px; ">Xem suất chiếu</button>
                        </span>
                    </div>
                }
            </div>
        </div>
    </div>
}
else
{
    <div class="panel" style="background-color: white; margin-top: 20px; margin-left: 15px; width: 97.5%; height: 485px;">
        <div class="filmkind">Cụm rạp</div>
    </div>
}
<script>
    function ChangeView() {
        window.location.href = "/Schedule/ScheduleTheater";
    }
</script>